package com.ch3cooh.producer.controller;

import com.ch3cooh.producer.service.FooService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.AutoConfigurationPackage;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SendController {

    @Autowired
    FooService fooService;

    @RequestMapping("/send")
    public String sendMsg(){
        return fooService.foo()?"消息发送成功":"error";
    }

    @RequestMapping("/sends")
    public String sendMsgs(){
        return fooService.foo2()?"消息发送成功":"error";
    }

    @RequestMapping("/sendFanout")
    public String sendMsgFanout(){
        return fooService.fooFanout()?"消息发送成功":"error";
    }
}
